import {get,post} from "./http"

// 判断管理员是否登录成功
export const getLoginStatus = (params) => post(`admin/login/status`,params)

//============歌手相关================
//查询歌手
export const getAllSinger =() => get(`singer/allSinger`)
//添加歌手
export const setSinger = (params) => post(`singer/add`,params)
//编辑歌手
export const updateSinger = (params) => post(`singer/update`,params)
//删除歌手
export const delSinger = (id) => get(`singer/delete?id=${id}`)

//============歌曲相关================
//根据歌手id查询歌曲
export const songOfSingerId =(id) => get(`song/singer/detail?singerId=${id}`)
//编辑歌曲
export const updateSong = (params) => post(`song/update`,params)
//删除歌曲
export const delSong = (id) => get(`song/delete?id=${id}`)
//根据歌曲id查询歌曲对象
export const songOfSongId =(id) => get(`song/detail?songId=${id}`)
//根据歌曲名获取歌曲对象
export const songOfSongName =(songName) => get(`song/songOfSongName?songName=${songName}`)
//查询所有歌曲
export const allSong =() => get(`song/allSong`)

//============榜单相关================
//查询榜单
export const getAllRank =() => get(`rank/allRank`)
//添加榜单
export const setRank = (params) => post(`rank/add`,params)
//编辑榜单
export const updateRank = (params) => post(`rank/update`,params)
//删除榜单
export const delRank = (id) => get(`rank/delete?id=${id}`)

//============榜单歌曲相关============
//根据榜单id查询歌曲列表
export const rankSongDetail = (rankId) => get(`rankSong/detail?rankId=${rankId}`)
//给榜单增加歌曲
export const rankSongAdd = (params) => post(`rankSong/add`,params)
//删除榜单的歌曲
export const delRankSong = (songId,rankId) => get(`rankSong/delete?songId=${songId}&rankId=${rankId}`)



